package com.itheima.dao;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserDao {
    @Select("select *from user")
    List<User> findAll();
    @Insert("insert into user values(#{id},#{username},#{email})")
    void add( User user);
    @Delete("delete from user where id=#{id}")
    void delete(User user);
    @Update("update user set username=#{username},email=#{email} where id=#{id}")
    void update(User user);
}
